// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成

package com.fowo.api.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fowo.api.common.model.OptionItem;
import com.fowo.api.entity.MaterialPurchaseOrder;
import com.fowo.api.model.material.purchase.order.MaterialPurchaseOrderItemVo;
import com.fowo.api.model.material.purchase.order.MaterialPurchaseOrderSearchParamPo;
import com.fowo.api.model.material.purchase.order.MaterialPurchaseOrderVo;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface MaterialPurchaseOrderMapper
  extends BaseMapper<MaterialPurchaseOrder> {
  Page<MaterialPurchaseOrderItemVo> pageSearch(
    @Param("page") Page page,
    @Param("search") MaterialPurchaseOrderSearchParamPo search
  );
  List<OptionItem<MaterialPurchaseOrderItemVo>> searchOptions(
    @Param("search") MaterialPurchaseOrderSearchParamPo search
  );
  List<MaterialPurchaseOrderItemVo> search(
    @Param("search") MaterialPurchaseOrderSearchParamPo search
  );
  Date searchLastUpdateTime(
    @Param("search") MaterialPurchaseOrderSearchParamPo search
  );
  /**
   * 搜索满足条件的所有记录的编号列表
   * @param search 搜索参数
   * @return 编号列表
   */
  List<Long> searchIds(
    @Param("search") MaterialPurchaseOrderSearchParamPo search
  );
  /**
   * 搜索满足条件的记录数量
   * @param search 搜索参数
   * @return 记录数量
   */
  Long searchCount(@Param("search") MaterialPurchaseOrderSearchParamPo search);
  Long getIdByPurNumSear(@Param("purNumSear") String purNumSear);

  List<Long> getIdsByPurNumSear(@Param("list") List<String> list);

  String getPurNumSearById(@Param("id") Long id);

  List<Map<String, Object>> getPurNumSearByIds(@Param("ids") List<Long> ids);
  MaterialPurchaseOrderVo selectVoById(@Param("id") Long id);
  /** 更新指定对象的所有计算字段值 */
  int updateCalcFields(Long id);
  /**
   * 全部
   */
  List<MaterialPurchaseOrderItemVo> quanbu(
    @Param("search") MaterialPurchaseOrderSearchParamPo search
  );

  /**
   * 获取全部编号列表
   */
  List<Long> quanbuIds(
    @Param("search") MaterialPurchaseOrderSearchParamPo search
  );

  /**
   * 获取全部的总数
   */
  Long quanbuCount(@Param("search") MaterialPurchaseOrderSearchParamPo search);

  /**
   * 全部分页
   */
  Page<MaterialPurchaseOrderItemVo> quanbuPage(
    @Param("page") Page page,
    @Param("search") MaterialPurchaseOrderSearchParamPo search
  );
  Date quanbuLastUpdateTime(
    @Param("search") MaterialPurchaseOrderSearchParamPo search
  );
  /**
   * 待提交
   */
  List<MaterialPurchaseOrderItemVo> daitijiao(
    @Param("search") MaterialPurchaseOrderSearchParamPo search
  );

  /**
   * 获取待提交编号列表
   */
  List<Long> daitijiaoIds(
    @Param("search") MaterialPurchaseOrderSearchParamPo search
  );

  /**
   * 获取待提交的总数
   */
  Long daitijiaoCount(
    @Param("search") MaterialPurchaseOrderSearchParamPo search
  );

  /**
   * 待提交分页
   */
  Page<MaterialPurchaseOrderItemVo> daitijiaoPage(
    @Param("page") Page page,
    @Param("search") MaterialPurchaseOrderSearchParamPo search
  );
  Date daitijiaoLastUpdateTime(
    @Param("search") MaterialPurchaseOrderSearchParamPo search
  );
  /**
   * 已完成
   */
  List<MaterialPurchaseOrderItemVo> yiwancheng(
    @Param("search") MaterialPurchaseOrderSearchParamPo search
  );

  /**
   * 获取已完成编号列表
   */
  List<Long> yiwanchengIds(
    @Param("search") MaterialPurchaseOrderSearchParamPo search
  );

  /**
   * 获取已完成的总数
   */
  Long yiwanchengCount(
    @Param("search") MaterialPurchaseOrderSearchParamPo search
  );

  /**
   * 已完成分页
   */
  Page<MaterialPurchaseOrderItemVo> yiwanchengPage(
    @Param("page") Page page,
    @Param("search") MaterialPurchaseOrderSearchParamPo search
  );
  Date yiwanchengLastUpdateTime(
    @Param("search") MaterialPurchaseOrderSearchParamPo search
  );
}
